package com.xingkeduo.pojo.enums;

import lombok.Getter;

@Getter
public enum HairstyleAgeQuery {

    Child("child",2) ; //儿童

    private String key;

    private Integer value;
    HairstyleAgeQuery(String key, Integer value) {
        this.key = key;
        this.value = value;
    }

    public static Integer getValue(String key){
        for (HairstyleAgeQuery s : HairstyleAgeQuery.values())
            if(s.key.equals(key)){
                return s.getValue();
            }
        return null;
    }
}
